3.1.89 \(\int \cos ^{16}(c+d x) (a+i a \tan (c+d x))^8 \, dx\) [89]

3.1.89.1 Optimal result
3.1.89.2 Mathematica [A] (verified)
3.1.89.3 Rubi [A] (verified)
3.1.89.4 Maple [B] (verified)
3.1.89.5 Fricas [A] (verification not implemented)
3.1.89.6 Sympy [A] (verification not implemented)
3.1.89.7 Maxima [A] (verification not implemented)
3.1.89.8 Giac [B] (verification not implemented)
3.1.89.9 Mupad [B] (verification not implemented)

3.1.89.1 Optimal result

Integrand size = 24, antiderivative size = 225 \[ \int \cos ^{16}(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {a^8 x}{256}-\frac {i a^{16}}{16 d (a-i a \tan (c+d x))^8}-\frac {i a^{15}}{28 d (a-i a \tan (c+d x))^7}-\frac {i a^{14}}{48 d (a-i a \tan (c+d x))^6}-\frac {i a^{13}}{80 d (a-i a \tan (c+d x))^5}-\frac {i a^{12}}{128 d (a-i a \tan (c+d x))^4}-\frac {i a^{11}}{192 d (a-i a \tan (c+d x))^3}-\frac {i a^{10}}{256 d (a-i a \tan (c+d x))^2}-\frac {i a^9}{256 d (a-i a \tan (c+d x))} \]

output
1/256*a^8*x-1/16*I*a^16/d/(a-I*a*tan(d*x+c))^8-1/28*I*a^15/d/(a-I*a*tan(d* 
x+c))^7-1/48*I*a^14/d/(a-I*a*tan(d*x+c))^6-1/80*I*a^13/d/(a-I*a*tan(d*x+c) 
)^5-1/128*I*a^12/d/(a-I*a*tan(d*x+c))^4-1/192*I*a^11/d/(a-I*a*tan(d*x+c))^ 
3-1/256*I*a^10/d/(a-I*a*tan(d*x+c))^2-1/256*I*a^9/d/(a-I*a*tan(d*x+c))
 
3.1.89.2 Mathematica [A] (verified)

Time = 0.98 (sec) , antiderivative size = 152, normalized size of antiderivative = 0.68 \[ \int \cos ^{16}(c+d x) (a+i a \tan (c+d x))^8 \, dx=-\frac {i a^8 \sec ^8(c+d x) (7350+12544 \cos (2 (c+d x))+7840 \cos (4 (c+d x))+3840 \cos (6 (c+d x))+1194 \cos (8 (c+d x))-3136 i \sin (2 (c+d x))-3920 i \sin (4 (c+d x))-2880 i \sin (6 (c+d x))-1089 i \sin (8 (c+d x))+840 \arctan (\tan (c+d x)) (i \cos (8 (c+d x))+\sin (8 (c+d x))))}{215040 d (i+\tan (c+d x))^8} \]

input
Integrate[Cos[c + d*x]^16*(a + I*a*Tan[c + d*x])^8,x]
 
output
((-1/215040*I)*a^8*Sec[c + d*x]^8*(7350 + 12544*Cos[2*(c + d*x)] + 7840*Co 
s[4*(c + d*x)] + 3840*Cos[6*(c + d*x)] + 1194*Cos[8*(c + d*x)] - (3136*I)* 
Sin[2*(c + d*x)] - (3920*I)*Sin[4*(c + d*x)] - (2880*I)*Sin[6*(c + d*x)] - 
 (1089*I)*Sin[8*(c + d*x)] + 840*ArcTan[Tan[c + d*x]]*(I*Cos[8*(c + d*x)] 
+ Sin[8*(c + d*x)])))/(d*(I + Tan[c + d*x])^8)
 
3.1.89.3 Rubi [A] (verified)

Time = 0.36 (sec) , antiderivative size = 203, normalized size of antiderivative = 0.90, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3042, 3968, 54, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \cos ^{16}(c+d x) (a+i a \tan (c+d x))^8 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(a+i a \tan (c+d x))^8}{\sec (c+d x)^{16}}dx\)

\(\Big \downarrow \) 3968

\(\displaystyle -\frac {i a^{17} \int \frac {1}{(a-i a \tan (c+d x))^9 (i \tan (c+d x) a+a)}d(i a \tan (c+d x))}{d}\)

\(\Big \downarrow \) 54

\(\displaystyle -\frac {i a^{17} \int \left (\frac {1}{2 (a-i a \tan (c+d x))^9 a}+\frac {1}{4 (a-i a \tan (c+d x))^8 a^2}+\frac {1}{8 (a-i a \tan (c+d x))^7 a^3}+\frac {1}{16 (a-i a \tan (c+d x))^6 a^4}+\frac {1}{32 (a-i a \tan (c+d x))^5 a^5}+\frac {1}{64 (a-i a \tan (c+d x))^4 a^6}+\frac {1}{128 (a-i a \tan (c+d x))^3 a^7}+\frac {1}{256 \left (\tan ^2(c+d x) a^2+a^2\right ) a^8}+\frac {1}{256 (a-i a \tan (c+d x))^2 a^8}\right )d(i a \tan (c+d x))}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {i a^{17} \left (\frac {i \arctan (\tan (c+d x))}{256 a^9}+\frac {1}{256 a^8 (a-i a \tan (c+d x))}+\frac {1}{256 a^7 (a-i a \tan (c+d x))^2}+\frac {1}{192 a^6 (a-i a \tan (c+d x))^3}+\frac {1}{128 a^5 (a-i a \tan (c+d x))^4}+\frac {1}{80 a^4 (a-i a \tan (c+d x))^5}+\frac {1}{48 a^3 (a-i a \tan (c+d x))^6}+\frac {1}{28 a^2 (a-i a \tan (c+d x))^7}+\frac {1}{16 a (a-i a \tan (c+d x))^8}\right )}{d}\)

input
Int[Cos[c + d*x]^16*(a + I*a*Tan[c + d*x])^8,x]
 
output
((-I)*a^17*(((I/256)*ArcTan[Tan[c + d*x]])/a^9 + 1/(16*a*(a - I*a*Tan[c + 
d*x])^8) + 1/(28*a^2*(a - I*a*Tan[c + d*x])^7) + 1/(48*a^3*(a - I*a*Tan[c 
+ d*x])^6) + 1/(80*a^4*(a - I*a*Tan[c + d*x])^5) + 1/(128*a^5*(a - I*a*Tan 
[c + d*x])^4) + 1/(192*a^6*(a - I*a*Tan[c + d*x])^3) + 1/(256*a^7*(a - I*a 
*Tan[c + d*x])^2) + 1/(256*a^8*(a - I*a*Tan[c + d*x]))))/d
 

3.1.89.3.1 Defintions of rubi rules used

rule 54
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[E 
xpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && 
 ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && LtQ[m + n + 2, 0])
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3968
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ 
), x_Symbol] :> Simp[1/(a^(m - 2)*b*f)   Subst[Int[(a - x)^(m/2 - 1)*(a + x 
)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && 
 EqQ[a^2 + b^2, 0] && IntegerQ[m/2]
 
3.1.89.4 Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 738 vs. \(2 (191 ) = 382\).

Time = 2.59 (sec) , antiderivative size = 739, normalized size of antiderivative = 3.28

\[\text {Expression too large to display}\]

input
int(cos(d*x+c)^16*(a+I*a*tan(d*x+c))^8,x)
 
output
1/d*(a^8*(-1/16*sin(d*x+c)^7*cos(d*x+c)^9-1/32*sin(d*x+c)^5*cos(d*x+c)^9-5 
/384*sin(d*x+c)^3*cos(d*x+c)^9-1/256*sin(d*x+c)*cos(d*x+c)^9+1/2048*(cos(d 
*x+c)^7+7/6*cos(d*x+c)^5+35/24*cos(d*x+c)^3+35/16*cos(d*x+c))*sin(d*x+c)+3 
5/32768*d*x+35/32768*c)+56*I*a^8*(-1/16*sin(d*x+c)^4*cos(d*x+c)^12-1/56*si 
n(d*x+c)^2*cos(d*x+c)^12-1/336*cos(d*x+c)^12)-28*a^8*(-1/16*sin(d*x+c)^5*c 
os(d*x+c)^11-5/224*sin(d*x+c)^3*cos(d*x+c)^11-5/896*sin(d*x+c)*cos(d*x+c)^ 
11+1/1792*(cos(d*x+c)^9+9/8*cos(d*x+c)^7+21/16*cos(d*x+c)^5+105/64*cos(d*x 
+c)^3+315/128*cos(d*x+c))*sin(d*x+c)+45/32768*d*x+45/32768*c)-8*I*a^8*(-1/ 
16*sin(d*x+c)^6*cos(d*x+c)^10-3/112*sin(d*x+c)^4*cos(d*x+c)^10-1/112*cos(d 
*x+c)^10*sin(d*x+c)^2-1/560*cos(d*x+c)^10)+70*a^8*(-1/16*sin(d*x+c)^3*cos( 
d*x+c)^13-3/224*sin(d*x+c)*cos(d*x+c)^13+1/896*(cos(d*x+c)^11+11/10*cos(d* 
x+c)^9+99/80*cos(d*x+c)^7+231/160*cos(d*x+c)^5+231/128*cos(d*x+c)^3+693/25 
6*cos(d*x+c))*sin(d*x+c)+99/32768*d*x+99/32768*c)-1/2*I*a^8*cos(d*x+c)^16- 
28*a^8*(-1/16*sin(d*x+c)*cos(d*x+c)^15+1/224*(cos(d*x+c)^13+13/12*cos(d*x+ 
c)^11+143/120*cos(d*x+c)^9+429/320*cos(d*x+c)^7+1001/640*cos(d*x+c)^5+1001 
/512*cos(d*x+c)^3+3003/1024*cos(d*x+c))*sin(d*x+c)+429/32768*d*x+429/32768 
*c)-56*I*a^8*(-1/16*cos(d*x+c)^14*sin(d*x+c)^2-1/112*cos(d*x+c)^14)+a^8*(1 
/16*(cos(d*x+c)^15+15/14*cos(d*x+c)^13+65/56*cos(d*x+c)^11+143/112*cos(d*x 
+c)^9+1287/896*cos(d*x+c)^7+429/256*cos(d*x+c)^5+2145/1024*cos(d*x+c)^3+64 
35/2048*cos(d*x+c))*sin(d*x+c)+6435/32768*d*x+6435/32768*c))
 
3.1.89.5 Fricas [A] (verification not implemented)

Time = 0.30 (sec) , antiderivative size = 125, normalized size of antiderivative = 0.56 \[ \int \cos ^{16}(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {1680 \, a^{8} d x - 105 i \, a^{8} e^{\left (16 i \, d x + 16 i \, c\right )} - 960 i \, a^{8} e^{\left (14 i \, d x + 14 i \, c\right )} - 3920 i \, a^{8} e^{\left (12 i \, d x + 12 i \, c\right )} - 9408 i \, a^{8} e^{\left (10 i \, d x + 10 i \, c\right )} - 14700 i \, a^{8} e^{\left (8 i \, d x + 8 i \, c\right )} - 15680 i \, a^{8} e^{\left (6 i \, d x + 6 i \, c\right )} - 11760 i \, a^{8} e^{\left (4 i \, d x + 4 i \, c\right )} - 6720 i \, a^{8} e^{\left (2 i \, d x + 2 i \, c\right )}}{430080 \, d} \]

input
integrate(cos(d*x+c)^16*(a+I*a*tan(d*x+c))^8,x, algorithm="fricas")
 
output
1/430080*(1680*a^8*d*x - 105*I*a^8*e^(16*I*d*x + 16*I*c) - 960*I*a^8*e^(14 
*I*d*x + 14*I*c) - 3920*I*a^8*e^(12*I*d*x + 12*I*c) - 9408*I*a^8*e^(10*I*d 
*x + 10*I*c) - 14700*I*a^8*e^(8*I*d*x + 8*I*c) - 15680*I*a^8*e^(6*I*d*x + 
6*I*c) - 11760*I*a^8*e^(4*I*d*x + 4*I*c) - 6720*I*a^8*e^(2*I*d*x + 2*I*c)) 
/d
 
3.1.89.6 Sympy [A] (verification not implemented)

Time = 0.69 (sec) , antiderivative size = 323, normalized size of antiderivative = 1.44 \[ \int \cos ^{16}(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {a^{8} x}{256} + \begin {cases} \frac {- 354658470655426560 i a^{8} d^{7} e^{16 i c} e^{16 i d x} - 3242591731706757120 i a^{8} d^{7} e^{14 i c} e^{14 i d x} - 13240582904469258240 i a^{8} d^{7} e^{12 i c} e^{12 i d x} - 31777398970726219776 i a^{8} d^{7} e^{10 i c} e^{10 i d x} - 49652185891759718400 i a^{8} d^{7} e^{8 i c} e^{8 i d x} - 52962331617877032960 i a^{8} d^{7} e^{6 i c} e^{6 i d x} - 39721748713407774720 i a^{8} d^{7} e^{4 i c} e^{4 i d x} - 22698142121947299840 i a^{8} d^{7} e^{2 i c} e^{2 i d x}}{1452681095804627189760 d^{8}} & \text {for}\: d^{8} \neq 0 \\x \left (\frac {a^{8} e^{16 i c}}{256} + \frac {a^{8} e^{14 i c}}{32} + \frac {7 a^{8} e^{12 i c}}{64} + \frac {7 a^{8} e^{10 i c}}{32} + \frac {35 a^{8} e^{8 i c}}{128} + \frac {7 a^{8} e^{6 i c}}{32} + \frac {7 a^{8} e^{4 i c}}{64} + \frac {a^{8} e^{2 i c}}{32}\right ) & \text {otherwise} \end {cases} \]

input
integrate(cos(d*x+c)**16*(a+I*a*tan(d*x+c))**8,x)
 
output
a**8*x/256 + Piecewise(((-354658470655426560*I*a**8*d**7*exp(16*I*c)*exp(1 
6*I*d*x) - 3242591731706757120*I*a**8*d**7*exp(14*I*c)*exp(14*I*d*x) - 132 
40582904469258240*I*a**8*d**7*exp(12*I*c)*exp(12*I*d*x) - 3177739897072621 
9776*I*a**8*d**7*exp(10*I*c)*exp(10*I*d*x) - 49652185891759718400*I*a**8*d 
**7*exp(8*I*c)*exp(8*I*d*x) - 52962331617877032960*I*a**8*d**7*exp(6*I*c)* 
exp(6*I*d*x) - 39721748713407774720*I*a**8*d**7*exp(4*I*c)*exp(4*I*d*x) - 
22698142121947299840*I*a**8*d**7*exp(2*I*c)*exp(2*I*d*x))/(145268109580462 
7189760*d**8), Ne(d**8, 0)), (x*(a**8*exp(16*I*c)/256 + a**8*exp(14*I*c)/3 
2 + 7*a**8*exp(12*I*c)/64 + 7*a**8*exp(10*I*c)/32 + 35*a**8*exp(8*I*c)/128 
 + 7*a**8*exp(6*I*c)/32 + 7*a**8*exp(4*I*c)/64 + a**8*exp(2*I*c)/32), True 
))
 
3.1.89.7 Maxima [A] (verification not implemented)

Time = 0.37 (sec) , antiderivative size = 246, normalized size of antiderivative = 1.09 \[ \int \cos ^{16}(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {105 \, {\left (d x + c\right )} a^{8} + \frac {105 \, a^{8} \tan \left (d x + c\right )^{15} + 805 \, a^{8} \tan \left (d x + c\right )^{13} + 2681 \, a^{8} \tan \left (d x + c\right )^{11} + 5053 \, a^{8} \tan \left (d x + c\right )^{9} + 2883 \, a^{8} \tan \left (d x + c\right )^{7} + 21504 i \, a^{8} \tan \left (d x + c\right )^{6} + 70791 \, a^{8} \tan \left (d x + c\right )^{5} - 114688 i \, a^{8} \tan \left (d x + c\right )^{4} - 117285 \, a^{8} \tan \left (d x + c\right )^{3} + 74752 i \, a^{8} \tan \left (d x + c\right )^{2} + 26775 \, a^{8} \tan \left (d x + c\right ) - 4096 i \, a^{8}}{\tan \left (d x + c\right )^{16} + 8 \, \tan \left (d x + c\right )^{14} + 28 \, \tan \left (d x + c\right )^{12} + 56 \, \tan \left (d x + c\right )^{10} + 70 \, \tan \left (d x + c\right )^{8} + 56 \, \tan \left (d x + c\right )^{6} + 28 \, \tan \left (d x + c\right )^{4} + 8 \, \tan \left (d x + c\right )^{2} + 1}}{26880 \, d} \]

input
integrate(cos(d*x+c)^16*(a+I*a*tan(d*x+c))^8,x, algorithm="maxima")
 
output
1/26880*(105*(d*x + c)*a^8 + (105*a^8*tan(d*x + c)^15 + 805*a^8*tan(d*x + 
c)^13 + 2681*a^8*tan(d*x + c)^11 + 5053*a^8*tan(d*x + c)^9 + 2883*a^8*tan( 
d*x + c)^7 + 21504*I*a^8*tan(d*x + c)^6 + 70791*a^8*tan(d*x + c)^5 - 11468 
8*I*a^8*tan(d*x + c)^4 - 117285*a^8*tan(d*x + c)^3 + 74752*I*a^8*tan(d*x + 
 c)^2 + 26775*a^8*tan(d*x + c) - 4096*I*a^8)/(tan(d*x + c)^16 + 8*tan(d*x 
+ c)^14 + 28*tan(d*x + c)^12 + 56*tan(d*x + c)^10 + 70*tan(d*x + c)^8 + 56 
*tan(d*x + c)^6 + 28*tan(d*x + c)^4 + 8*tan(d*x + c)^2 + 1))/d
 
3.1.89.8 Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1457 vs. \(2 (175) = 350\).

Time = 1.53 (sec) , antiderivative size = 1457, normalized size of antiderivative = 6.48 \[ \int \cos ^{16}(c+d x) (a+i a \tan (c+d x))^8 \, dx=\text {Too large to display} \]

input
integrate(cos(d*x+c)^16*(a+I*a*tan(d*x+c))^8,x, algorithm="giac")
 
output
1/13762560*(53760*a^8*d*x*e^(28*I*d*x + 14*I*c) + 752640*a^8*d*x*e^(26*I*d 
*x + 12*I*c) + 4892160*a^8*d*x*e^(24*I*d*x + 10*I*c) + 19568640*a^8*d*x*e^ 
(22*I*d*x + 8*I*c) + 53813760*a^8*d*x*e^(20*I*d*x + 6*I*c) + 107627520*a^8 
*d*x*e^(18*I*d*x + 4*I*c) + 161441280*a^8*d*x*e^(16*I*d*x + 2*I*c) + 16144 
1280*a^8*d*x*e^(12*I*d*x - 2*I*c) + 107627520*a^8*d*x*e^(10*I*d*x - 4*I*c) 
 + 53813760*a^8*d*x*e^(8*I*d*x - 6*I*c) + 19568640*a^8*d*x*e^(6*I*d*x - 8* 
I*c) + 4892160*a^8*d*x*e^(4*I*d*x - 10*I*c) + 752640*a^8*d*x*e^(2*I*d*x - 
12*I*c) + 184504320*a^8*d*x*e^(14*I*d*x) + 53760*a^8*d*x*e^(-14*I*c) - 259 
35*I*a^8*e^(28*I*d*x + 14*I*c)*log(e^(2*I*d*x + 2*I*c) + 1) - 363090*I*a^8 
*e^(26*I*d*x + 12*I*c)*log(e^(2*I*d*x + 2*I*c) + 1) - 2360085*I*a^8*e^(24* 
I*d*x + 10*I*c)*log(e^(2*I*d*x + 2*I*c) + 1) - 9440340*I*a^8*e^(22*I*d*x + 
 8*I*c)*log(e^(2*I*d*x + 2*I*c) + 1) - 25960935*I*a^8*e^(20*I*d*x + 6*I*c) 
*log(e^(2*I*d*x + 2*I*c) + 1) - 51921870*I*a^8*e^(18*I*d*x + 4*I*c)*log(e^ 
(2*I*d*x + 2*I*c) + 1) - 77882805*I*a^8*e^(16*I*d*x + 2*I*c)*log(e^(2*I*d* 
x + 2*I*c) + 1) - 77882805*I*a^8*e^(12*I*d*x - 2*I*c)*log(e^(2*I*d*x + 2*I 
*c) + 1) - 51921870*I*a^8*e^(10*I*d*x - 4*I*c)*log(e^(2*I*d*x + 2*I*c) + 1 
) - 25960935*I*a^8*e^(8*I*d*x - 6*I*c)*log(e^(2*I*d*x + 2*I*c) + 1) - 9440 
340*I*a^8*e^(6*I*d*x - 8*I*c)*log(e^(2*I*d*x + 2*I*c) + 1) - 2360085*I*a^8 
*e^(4*I*d*x - 10*I*c)*log(e^(2*I*d*x + 2*I*c) + 1) - 363090*I*a^8*e^(2*I*d 
*x - 12*I*c)*log(e^(2*I*d*x + 2*I*c) + 1) - 89008920*I*a^8*e^(14*I*d*x)...
 
3.1.89.9 Mupad [B] (verification not implemented)

Time = 5.67 (sec) , antiderivative size = 195, normalized size of antiderivative = 0.87 \[ \int \cos ^{16}(c+d x) (a+i a \tan (c+d x))^8 \, dx=\frac {a^8\,x}{256}-\frac {-\frac {a^8\,{\mathrm {tan}\left (c+d\,x\right )}^7}{256}-\frac {a^8\,{\mathrm {tan}\left (c+d\,x\right )}^6\,1{}\mathrm {i}}{32}+\frac {85\,a^8\,{\mathrm {tan}\left (c+d\,x\right )}^5}{768}+\frac {a^8\,{\mathrm {tan}\left (c+d\,x\right )}^4\,11{}\mathrm {i}}{48}-\frac {1193\,a^8\,{\mathrm {tan}\left (c+d\,x\right )}^3}{3840}-\frac {a^8\,{\mathrm {tan}\left (c+d\,x\right )}^2\,143{}\mathrm {i}}{480}+\frac {5993\,a^8\,\mathrm {tan}\left (c+d\,x\right )}{26880}+\frac {a^8\,16{}\mathrm {i}}{105}}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^8+{\mathrm {tan}\left (c+d\,x\right )}^7\,8{}\mathrm {i}-28\,{\mathrm {tan}\left (c+d\,x\right )}^6-{\mathrm {tan}\left (c+d\,x\right )}^5\,56{}\mathrm {i}+70\,{\mathrm {tan}\left (c+d\,x\right )}^4+{\mathrm {tan}\left (c+d\,x\right )}^3\,56{}\mathrm {i}-28\,{\mathrm {tan}\left (c+d\,x\right )}^2-\mathrm {tan}\left (c+d\,x\right )\,8{}\mathrm {i}+1\right )} \]

input
int(cos(c + d*x)^16*(a + a*tan(c + d*x)*1i)^8,x)
 
output
(a^8*x)/256 - ((5993*a^8*tan(c + d*x))/26880 + (a^8*16i)/105 - (a^8*tan(c 
+ d*x)^2*143i)/480 - (1193*a^8*tan(c + d*x)^3)/3840 + (a^8*tan(c + d*x)^4* 
11i)/48 + (85*a^8*tan(c + d*x)^5)/768 - (a^8*tan(c + d*x)^6*1i)/32 - (a^8* 
tan(c + d*x)^7)/256)/(d*(tan(c + d*x)^3*56i - 28*tan(c + d*x)^2 - tan(c + 
d*x)*8i + 70*tan(c + d*x)^4 - tan(c + d*x)^5*56i - 28*tan(c + d*x)^6 + tan 
(c + d*x)^7*8i + tan(c + d*x)^8 + 1))